
class BaseExeHis:
    def __init__(self, nodemanager, projectID:str, sessionID:str, nodeID:str, beforerunning=False):
        self.nodemanager = nodemanager
        self.projectID = projectID
        self.sessionID = sessionID
        if not beforerunning: 
            self.session_info = nodemanager.get_session_info_by_id(sessionID)
            if self.session_info is not None: self.session_info.add_new_exe_his(self)
        else: self.session_info=None
        self.nodeID = nodeID
        self.nodeName = nodemanager.nodesByIdDict[nodeID].name
        # self.callTime = 
        self.content = None
        self.running = True
    
    def done(self):
        self.running = False

    def update_content(self, content):
        self.content = content
        if self.session_info:self.session_info.update_exe_his_order(self)

    def get_content(self):
        return self.content